﻿@page
@model Senparc.Areas.Admin.Areas.Admin.Pages.RoleIndexModel
@{
    ViewData["Title"] = "角色管理";
}
@section breadcrumbs{
    <li>系统管理</li>
    <li>
        角色管理
    </li>
}

<div class="row">

    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_panel">
            <div class="pull-left" style="width: 100%">
                <div class="row">
                    <div class="col-xs-12 col-md-2 col-lg-2">
                        <a asp-page="Edit" asp-route-id="" title="新增" class="btn-sm btn btn-success">
                            <em class="fa fa-plus"></em> &nbsp;<small>新增</small>
                        </a>
                        <label for="deleteBtn" class="btn-sm btn btn-danger" title="删除">
                            <em class="fa fa-trash-o"></em> &nbsp;<small>删除</small>
                            <input type="submit" id="deleteBtn" onclick="deleteCheck('ids','deleteForm'); return false;" form="deleteForm" class="hidden" value="删除" />
                        </label>
                    </div>
                    @*<div class="col-xs-12 col-md-10 col-lg-10 form-horizontal form-label-left">
                            <form id="searchForm" asp-page="/CommodityCategory/Index" asp-area="Admin" method="get">
                                <div class="form-group">
                                    <label class="control-label col-md-1 col-sm-1 col-xs-6" for="first-name">
                                        分类名称
                                    </label>
                                    <div class="col-md-2 col-sm-2 col-xs-6">
                                        <input type="text" asp-for="SearchCategoryDto.Name" class="form-control col-md-7 col-xs-12">
                                    </div>

                                    <label class="control-label col-md-1 col-sm-1 col-xs-6" for="first-name">
                                        父级分类
                                    </label>
                                    <div class="col-md-2 col-sm-2 col-xs-6">
                                        <select class="form-control" asp-for="SearchCategoryDto.ParentId" asp-items="Model.CommodityCategorySelectListItems">
                                            <option>请选择</option>
                                        </select>
                                    </div>

                                    <div class="col-md-2 col-sm-2 col-xs-6">
                                        <input type="submit" class="btn btn-primary" value="查询" />
                                    </div>
                                </div>
                            </form>
                        </div>*@
                </div>
            </div>
            <div class="clearfix"></div>
            <div class="x_content">
                @*<p>Add class <code>bulk_action</code> to table for bulk actions options on row select</p>*@
                <div class="table-responsive">
                    <table class="table table-striped jambo_table bulk_action">
                        <thead>
                            <tr class="headings">
                                <th>
                                    <input type="checkbox" id="check-all" class="flat">
                                </th>
                                <th class="column-title">角色名称</th>
                                <th class="column-title">角色代码 </th>
                                <th class="column-title">备注</th>
                                <th class="column-title">说明</th>
                                <th class="column-title">添加时间 </th>
                                <th class="column-title">操作 </th>
                                <th class="bulk-actions" colspan="16">
                                    <a class="antoo" style="color:#fff; font-weight:500;">
                                        已选中 <span class="action-cnt"> </span>
                                        <i class="fa fa-chevron-down"></i>
                                    </a>
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @foreach (var item in Model.SysRoles)
                            {
                                <tr class="pointer">
                                    <td class="a-center ">
                                        <input type="checkbox" class="flat table_records" name="ids" form="deleteForm" value="@item.Id">
                                    </td>
                                    <td class=" ">@item.RoleName </td>
                                    <td class=" ">@item.RoleCode</td>
                                    <td class=" ">@item.AdminRemark</td>
                                    <td class=" ">@item.Remark</td>
                                    <td class=" "> @item.AddTime.ToShortDateString()</td>
                                    <td class=" ">
                                        <a asp-page="Edit" asp-route-id="@item.Id" title="编辑" class="btn-xs btn btn-info">
                                            <em class="fa fa-pencil-square-o">编辑</em>
                                        </a>
                                        <a asp-page="Permission" asp-route-RoleId="@item.Id" title="权限" class="btn-xs btn btn-info">
                                            <em class="fa fa-pencil-square-o">权限</em>
                                        </a>
                                        @*<button data-content="@item.Id" title="复制商品链接" class="copyLink btn-xs btn btn-default">
                                                复制<em class="fa fa-clone"></em>
                                            </button>*@
                                    </td>
                                </tr>
                            }
                        </tbody>
                    </table>
                </div>
                <div class="text-center p jpagerbar">
                    @Html.Raw((Html.PagerBar(Model.SysRoles, new PagerBarSettings(Url.Page("/Role/Index", new
       {
           pageIndex = "{0}"
       }))
       {
           NoRecordTip = "暂无数据",
           ShowTotalCount = true
       })))
                </div>
            </div>
        </div>
    </div>
</div>
<form method="post" asp-page-handler="Delete" id="deleteForm"></form>